fix: do not ship unit tests in released packages #8308
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
While test-integrating the patch set from #8307 I noticed that the patches were huge!
The functional change was miniscule though.
On investigation I discovered the patchset was huge because the unit test changes I made were showing up as diffs, because we have been shipping unit tests with our released packages for everything but functions and one other.
I made sure
__tests__
was in.npmignore
for all the packages (including a commit I tacked on the vertexai PR #8236) so those aren't shipped anymore and won't show up in package diffs when generating patch-package setsWhile test-integrating this patch and auditing the resulting node_modules package contents I noticed 4 of the packages still shipped types tests as well. Added a second commit that ignores those
Related issues
Noticed in
Release Summary
single conventional commit, but I did set it as a "fix" which will trigger a release since it affects the release artifacts
Checklist
Android
iOS
e2e
tests added or updated inpackages/\*\*/e2e
jest
tests added or updated inpackages/\*\*/__tests__
Test Plan
The patch-package set for this should result in removing the tests directories when applied while testing it
Think
react-native-firebase
is great? Please consider supporting the project with any of the below:React Native Firebase
andInvertase
on Twitter